package prjCode;
import org.apache.hadoop.io.Text;


public class TextTaggedKey extends TaggedKey<Text,Text> {


	public TextTaggedKey() {
		super();
	}

	public TextTaggedKey(Text tag) {
		super(tag);
	}

	public TextTaggedKey(Text tag,Text key) {
		super(tag,key);
	}

	@Override
	public void init() {
		tag = new Text();
		key = new Text();
	}

	@Override
	public int compareTo(TaggedKey<Text,Text> other) {
		int i = key.compareTo(other.key);
	
		if (i==0)
		{
			i=tag.compareTo(other.tag);

		}
		
		return i;
	}
	
	public void setKey(String key) 
	{ 
		
		this.key = new Text(key); 		
	}
	
	public void setTag(String tag) 
	{ 
		this.tag = new Text(tag);
		
	}

}